package cn.sytton.taffe.framework.properties.auth;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.context.annotation.Configuration;

/**
 * yml配置类：auth
 *
 * @author skyrock
 */
@Configuration
@ConfigurationProperties(prefix = "auth")
@EnableConfigurationProperties(AuthProperties.class)
public class AuthProperties {
    /**
     * api访问配置
     */
    @NestedConfigurationProperty
    private ApiProperties api = new ApiProperties();
    /**
     * 图片验证码配置
     */
    @NestedConfigurationProperty
    private CaptchaProperties captcha = new CaptchaProperties();
    /**
     * Jwt配置
     */
    @NestedConfigurationProperty
    private TokenProperties token = new TokenProperties();
    /**
     * 短信验证码配置
     */
    @NestedConfigurationProperty
    private SmsProperties sms = new SmsProperties();

    public CaptchaProperties getCaptcha() {
        return captcha;
    }

    public void setCaptcha(CaptchaProperties captcha) {
        this.captcha = captcha;
    }

    public ApiProperties getApi() {
        return api;
    }

    public void setApi(ApiProperties api) {
        this.api = api;
    }

    public TokenProperties getToken() {
        return token;
    }

    public void setToken(TokenProperties token) {
        this.token = token;
    }

    public SmsProperties getSms() {
        return sms;
    }

    public void setSms(SmsProperties sms) {
        this.sms = sms;
    }
}
